<?php
include_once ($_SERVER['DOCUMENT_ROOT'].'/global.php');
$array = array();
if($_POST['leibie'] == '1'){
  $leibie_sql = " jiaoshi_count = jiaoshi_count + 1 ";
}else{
  $leibie_sql = " xuesheng_count = xuesheng_count + 1 ";
}
$sql="
UPDATE QiKan set {$leibie_sql} where id in ({$_POST['qikan_array']})
";
$query = $mysqli->query($sql);
while ($a = $query->fetch_assoc()) {
  $array[] = $a;
}
echo json_encode($array);
exit;
?>
